package com.fbs.controller;


import com.fbs.utli.UplpadUtil;
import com.fbs.vo.Result;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;

@Controller
public class UploadController {

    @RequestMapping("upload")
    @ResponseBody
    public Result upload(MultipartFile file)throws Exception {
    String path = UplpadUtil.ossUpload(file);
    return new Result(200,"上传成功",path);


}



}
